//
//  UIButton+Extension.swift
//  SwiftWB
//
//  Created by 吴志勇 on 2019/6/14.
//  Copyright © 2019 wzy. All rights reserved.
//

import UIKit

extension UIButton
{
    convenience init(imageName:String,imageNameHighlighted:String, backgroundImageName:String, backgroundImageNameHighlighted:String) {
        self.init()
        setImage(UIImage(named: imageName), for: .normal)
        setImage(UIImage(named: imageNameHighlighted), for: .highlighted)
        setBackgroundImage(UIImage(named: backgroundImageName), for: .normal)
        setBackgroundImage(UIImage(named: backgroundImageNameHighlighted), for: .highlighted)
        sizeToFit()
    }
}
